package com.brillilab.service.module.message.template.impl.space;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: PrivatePlaneModifyToPrivateTemp
 * @ProjectName brill_lab
 * @Description: 私有平面被修改成功为-私有
 * @date 2019/5/27 15:42
 */
@Data
public class PrivatePlaneModifyToPrivateTemp extends AbstractMessageTemplate {
    private String labName;
    private Integer deviceNo;
    private String planeNo;
    private String newUserName;

    /**
     * 私有平面被修改成功为-私有
     * @param labId         实验室ID
     * @param receiverId    接收人ID
     * @param labMemberId   接收者实验室成员Id
     * @param labName       实验室名称
     * @param deviceNo      设备编号
     * @param planeNo       平面序号
     * @param newUserName   修改后的用户姓名
     */
    public PrivatePlaneModifyToPrivateTemp(Long labId, Long receiverId,Long labMemberId,String labName, Integer deviceNo, String planeNo, String newUserName) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.PrivatePlaneModifyToPrivate.getValue());
        super.setTitle("您的私有平面已被设为他人私有");
        String content = String.format("<span>您在</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>设备内的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>平面已被设置为</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>私有</span>" +
                        "，<span>如有疑问请联系实验室管理员</span>",
                labName, deviceNo, planeNo,newUserName);
        super.setContent(content);
        super.setAppContent(String.format("您在%s的%s设备内的%s平面已被设置为%s私有，如有疑问请联系实验室管理员",
                labName, deviceNo, planeNo,newUserName));
        this.labMemberId=labMemberId;
        this.labName = labName;
        this.deviceNo = deviceNo;
        this.planeNo = planeNo;
        this.newUserName = newUserName;
    }

}
